package com.rentalcar.rental_car.service.impl;

import com.rentalcar.rental_car.dao.NewsMapper;
import com.rentalcar.rental_car.entity.News;
import com.rentalcar.rental_car.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewsServiceImpl implements NewsService {
    @Autowired
    NewsMapper newsMapper;
    @Override
    public List<News> getNewsAll() {

        return newsMapper.getNewsAll();
    }

    @Override
    public News getNewsContent(News news) {

        return newsMapper.getNewsContent(news);
    }

    @Override
    public int add(News news) {

        return newsMapper.add(news);
    }

    @Override
    public int update(News news) {

        return newsMapper.update(news);
    }

    @Override
    public int delete(News news) {

        return newsMapper.delete(news);
    }
}
